<?php
	require_once ("inc/config.php");
	if(app_install==0){ header("Location:install/index.php" );	}
	require_once ("inc/conn.php");
	$page = safeData("page","get");
	
	if (isDynamic()){
		attemptCacheFile ("app","index".$page);
		$template->html = getCacheFile("template_index",$root."template/".app_templatedir."/".app_htmldir."/index.html");
		$CacheName = "vodindex".$page;
		
		if (chkCache($CacheName)){
			$template->html = getCache($CacheName);
		}
		else{
			$template->replaceLabel();
			$template->vodpagelist();
			$template->replaceLast();
			setCache($CacheName,$template->html,0);
		}
		setCacheFile ("app","index".$page,$template->html);
		$template->replaceRunTime();
		echo $template->html;
	}
	else{
		header("Location:" + getIndexLink());
	}
	dispseObj();
?>